package com.sxhalo.fsms.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.sxhalo.fsms.domain.DeviceAlarmRecord;

public interface DeviceAlarmRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(DeviceAlarmRecord record);

    int insertSelective(DeviceAlarmRecord record);

    DeviceAlarmRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(DeviceAlarmRecord record);
    int batchUpdateByWhere(@Param("record")DeviceAlarmRecord record,@Param("where")String where);

    int updateByPrimaryKey(DeviceAlarmRecord record);
    
    int getCount(@Param("where")String where);

    List<DeviceAlarmRecord> findWhereList(@Param("where")String where, @Param("order")String order);

    List<DeviceAlarmRecord> findPagerList(@Param("start")Integer start, @Param("length")Integer length, @Param("where")String where, @Param("order")String order);
    //报警趋势数据
    List<Map<String,Integer>> GetalarmTrendStatistics(@Param("type")Integer type);
    //报警数量
    Map<String,Integer> getAramNumStatistics();
    //报警分类
    List<Map<String,Integer>> getAramTypeNum(@Param("where")String where);
    List<Map<String,Object>> getAramTypeNumByArea(@Param("time")String time);
	int getSearchCount(@Param("where")String where);


    int batchInsert(@Param("list") List<DeviceAlarmRecord> list);

    List<Map<String,Integer>> getDeviceRunstateCount(@Param("areaId")Integer areaId);
    void maintenanceIntervalAram();
    int deleteByWhere(@Param("where")String where);


}